<?php

namespace app\mobileapp\controller;

use \think\Db;
use think\facade\Request;

class Third extends Base
{

    /**
     * User: Simony
     * Function:拉取聊天记录
     */
    public function exportChatRecord(){
        $time = time() - 3600 * (11+24+24);
        $res =  \app\common\command\crontab\Chat::exportChatRecord($time);
        $this->api_ajaxReturn($res['code'], $res['msg'], $res['result']);
    }

    /**
     * User: Simony
     * Function:环信文件上传
     */
    public function easemobImUploadFile()
    {
        $this->memberId;
        $easemob = new \easemob\EasemobIm();

        $file = Request::file('file');
        $res = $easemob->uploadFile($file);

        $this->api_ajaxReturn($res['code'], $res['msg'], $res['result']);

    }
}